<include file="public:header" />
<div class="allpagetop">问答管理<strong>/</strong>问题列表</div>
<div class="admin_main_nr_dbox">
 	    <div class="pagetit">
	        <div class="ptit">问题</div>
				<div class="topnav">
			       <!--  <a href="{:RU('question/add')}" <if condition="ACTION_NAME eq 'add'">class="select"</if>>添加</a>
					  <a href="{:RU('question/lists')}" <if condition="ACTION_NAME eq 'lists'">class="select"</if>>列表</a> -->
				    <div class="clear"></div>
				</div>
	        <div class="clear"></div>
	    </div>
		
  <div class="seltpye_x">
        <div class="left">审核状态</div>    
        <div class="right">
        <a href="{:P(array('audit'=>''))}" <if condition="$Think.get.audit eq ''">class="select"</if>>不限</a>
        <a href="{:P(array('audit'=>'0'))}" <if condition="$Think.get.audit eq '0'">class="select"</if>>未审核</a>
        <a href="{:P(array('audit'=>'1'))}" <if condition="$Think.get.audit eq '1'">class="select"</if>>已审核</a>
        <a href="{:P(array('audit'=>'-1'))}" <if condition="$Think.get.audit eq '-1'">class="select"</if>>未通过</a>
        <div class="clear"></div>
        </div>
        <div class="clear"></div>
    </div>
	
	
	<div class="seltpye_x">
        <div class="left">解决状态</div>    
        <div class="right">
        <a href="{:P(array('issolve'=>''))}" <if condition="$Think.get.issolve eq ''">class="select"</if>>不限</a>
        <a href="{:P(array('issolve'=>'0'))}" <if condition="$Think.get.issolve eq '0'">class="select"</if>>未解决</a>
        <a href="{:P(array('issolve'=>'1'))}" <if condition="$Think.get.issolve eq '1'">class="select"</if>>已解决</a>
         
        <div class="clear"></div>
        </div>
        <div class="clear"></div>
    </div>
	
    <form id="form1" name="form1" method="post" action="{:RU('question/delete')}">
	
	  <div class="admin_list_th">
	    <div class="td1" style=" width:30%;"><label id="chkAll" class="left_txt_td"><input type="checkbox" name="chkAll"  id="chk" title="全选/反选" />问题标题</label></div>
		<div class="td2" style=" width:8%;">审核状态</div>
		<div class="td4" style=" width:8%;">浏览(回答)</div>
		<div class="td3" style=" width:8%;">所属分类</div>
		<div class="td4" style=" width:12%;">标签</div>
		<div class="td4" style=" width:10%;">图片</div>
		<div class="td2" style=" width:12%;">发布人</div>
		<div class="td3" style=" width:5%;">发布时间</div>		
		<div class="td5" style=" width:7%;">
		<div class="admin_list_right">操作</div>
		</div>
	  <div class="clear"></div>
	  </div>
	  
	  
	    <volist name="lists.list" id="list">
					   <div class="admin_list_tr link_bk">
						<div class="td1" style=" width:30%;">
						  <div class="left_txt_td striking">
								<input name="id[]" type="checkbox" id="id" value="{$list.id}"  />
								<notempty name="list.reward"><span class="admingold">{$list.reward}</span></notempty>
								<a href="{$list.url}" target="_blank" <if condition="$list.issolve eq '1'">style="color:#BEBEBE"</if>>
								<if condition="$list.issolve eq '1'">[已解决]</if>
								{$list.title}</a>
						  </div>
						</div>
						<div class="td2" style=" width:8%;">{$list.audit_str}</div>
						<div class="td3" style=" width:8%;">{$list.click}/<span style="color: #FF6600">({$list.answercount})</span></div>
							<div class="td3" style=" width:8%;">
						 {$list.cat.c_title|default="未知"}
						</div>
						 <div class="td3" style=" width:12%;">
						  <volist name="list.tag" id="tags">
						  <a href="{$tags.tagurl}" target="_blank" >{$tags.tag}</a>&nbsp;&nbsp;
						  </volist>
						  <empty name="list.tag"><span style="color:#CCCCCC">无</span></empty>
						 </div>
						<div class="td3" style=" width:10%;">
						<volist name="list.img" id="imgs">
						  <a href="{$imgs.imgurl}" target="_blank" class="pictip">&nbsp;&nbsp;</a>
						  </volist>
						  <empty name="list.img"><span style="color:#CCCCCC">无</span></empty>
						</div>
						<div class="td3" style=" width:12%;">
						<span class="userLV">LV{$list.exp_lv}</span><a href="{$list.user.user_url}" target="_blank" >{$list.user.username}</a>
						</div>
						<div class="td3" style=" width:5%;">{$list.addtime_str}</div>
					   
						<div class="td5" style=" width:7%;">
									  <div class="admin_list_right link_blue">
									 <a href="{:RU('question/delete',array('id'=>$list['id']))}" onclick="return confirm('你确定要删除吗？')">删除</a>
									  </div>
						</div>
					  <div class="clear"></div>
					  </div>
	   </volist>
	  
	
	   <div id="J_audit_from"></div>
		<div id="J_cat_from"></div>
      
  </form>
  
  
    <empty name="lists.list">
    <div class="admin_list_no_info">没有任何信息！</div>
    </empty>
	
	
	
	<div class="admin_list_foot">
			  <div class="btnbox">
				 <input type="button"  class="admin_submit"   value="审核" id="J_btn_audit"/>
				<!-- <input type="button"  class="admin_submit"   value="分类" id="J_cat_btn"/> -->
				 <input type="button"  class="admin_submit" id="J_btn_del"   value="删除"/>
			  </div>
			  
			  
			  
	          <div class="footso">
			  			<form action="{:RU('question/lists')}" method="get">
						<div class="sobox">
							<input name="key" type="text"  class="sinput" maxlength="10" value="{$Think.get.key}"/>
							<input name="key_type" id="J_key_type_id" type="hidden" value="{$Think.get.key_type|default="1"}" />
							<input name="key_type_cn" id="J_key_type_cn" type="hidden" value="{$Think.get.key_type_cn|default="标题"}" />
							<input name="" type="submit" value=""  class="sobtn"/>
							<div class="sotype" id="J_key_click">{$Think.get.key_type_cn|default="标题"}</div>
							
							
							
							
							
							<div class="mlist" id="J_mlist">
							<ul>
							<li id="1" title="标题">标题</li>
							<li id="2" title="内容">内容</li>
							<li id="3" title="UID">UID</li>
							</ul>
							</div>
						</div>
						</form>
			  </div>
	</div>
	
 
    <div class="uupage">{$lists.page}</div>
</div>
<include file="public:footer" />

<div id="J_audit_select" style="display:none">
		<div class="showdialog">
		<div class="dtit">将所选问题审核状态设置为：</div>
		  <div class="dtxt">
		 
						<div class="imgradio">
												<input name="audit" type="hidden" value="1" />
												<div class="radio select" data="1">审核通过</div>
												<div class="clear"></div>
												<div class="radio " data="-1">审核未通过</div>
												<div class="clear"></div>
						</div>
		  </div>
		
	       <div class="dtxt">
		   <input type="button"  class="admin_submit"   value="确定选择" id="J_save_audit_btn"/>
		   </div>
	 
	  </div>
</div>


<div id="J_cat_select" style="display:none">

  <div class="showdialog">
		<div class="dtit">将所选标签分类设置为</div>
		
			  <volist name="cat" id="catlist">
			<div class="dlistx" id="{$catlist.id}">{$catlist.title}</div>
			 </volist>
			<div class="clear"></div>
		
		
				<div class="auditbtns">
				   <input name="cat" type="hidden" value="" />
				   <input type="button"  class="admin_submit"   value="确定选择" id="J_save_cat_btn"/>
				 </div>
	  </div>

</div>
<script type="text/javascript">
    $(document).ready(function()
    {	
        //点击批量取删除   
        $("#J_btn_del").click(function(){
			
            if (confirm('你确定要删除吗？'))
            {
				$("form[name=form1]").attr("action","{:RU('question/delete')}").submit();
            }
        });
		//批量审核弹窗
		$("#J_btn_audit").dialog({
		  DialogAddObj:"#J_audit_from",
		  DialogTitle:"请选择审核状态",
		  DialogContent:"#J_audit_select",
		  DialogContentType:"id"
		});
		//确定审核
		$('#J_save_audit_btn').live('click',function() {
			$("form[name=form1]").attr("action","{:RU('question/audit')}").submit();
		});
		 
		
		 
		
    });
</script>
</body>
</html>